package com.zkthink.ceres.applet.server.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zkthink.ceres.applet.product.domain.vo.MyServerOrProductVo;
import com.zkthink.ceres.applet.server.domain.entity.AppletStoreServer;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**

@Author cmz
@Date 2024-04-30 13:16
*/
public interface AppletStoreServerMapper extends BaseMapper<AppletStoreServer> {
    AppletStoreServer selectByStoreIdServerId(@Param("serverId") Long serverId,@Param("storeId") Long storeId);

    @Select("SELECT ass.id, ase.title `serverName`, ase.img, ass.group_buy_price price FROM applet_store_server ass LEFT JOIN applet_server ase ON ass.server_id = ase.id  where ass.is_delete !=1 and  ass.store_id = #{storeId} ")
    List<MyServerOrProductVo> selectByStoreId(Long storeId);
}